<!--
    page description : 근태관리 - 입력자 - 근태등록 화면 - 출근입력 (pop_up)
    author      : Yang D
    date        : 2009-01-16
    file name   : attend_open_p.jsp
-->
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
	<s:head theme="ajax" />
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<link rel="stylesheet" type="text/css" href="/inc/css/common.css" />
	<link rel="stylesheet" type="text/css" href="style/style.css" />
	<script src="inc/js/common.js"></script>
	<title>근태변경 입력</title>
	<script type="text/javascript" language="javascript">
	
	// --------------------J A V A S C R I P T-START-------------------- //
		
		function fnc_submit(f) {
		
			//출근지
			//var req_etc 	        =	f.req_etc.value;
			//var len		            =	f.req_etc.value.length;
            //var i=0;
            //var cnt=0;
			

                 
	                //for(i=0;i<len;i++){
                    // if(req_etc.charAt(i)==" "){
                         // cnt++;
                       // }

	               // } 
                    // if(len==cnt){
                       // alert("비고란에 공백을 허용하지 않습니다.");
                       // f.req_etc.focus();
                       // return false;
             		// }
             		
                  
         

			if (confirm("근태 변경을 요청하시겠습니까?")) {
				f.action = "updateChange.action";		
			} else {
				alert("취소되었습니다.");
				return false;
			}
		}
		
		//출근정보 저장시
		// ajax를 적용하여 opener의 죄회 데이터를 바로 적용함.
	    function fnc_apply_change() {
	
	        var rtn_msg = document.getElementById("msg").value;
	        
	        if(rtn_msg.length != 0) {
	            alert(rtn_msg);
	            window.close();
	            opener.call_dojo();
	        }
	        
	    }

	    
		
	//-- --------------------J A V A S C R I P T-E N D-------------------- //
	</script>
</head>
<body onload="fnc_apply_change()">
	<s:form name="frm_check_in" id="frm_check_in" method="post" theme="simple" onsubmit="return fnc_submit(this)">
		<s:hidden name="reqYyyymmdd"    />		<!-- 요청일자  REQ_DT-->
		<s:hidden name="reqYmd" 		/>		<!-- 기준일자 -->
		<s:hidden name="check_in_time" 	/>		<!-- 출근시간 표시 -->
		<s:hidden name="msg" 			/>		<!-- 저장 메시지 출력 -->
		<s:hidden name="emp_no" 		/>		
		<s:hidden name="reqInOutTp"     />
		<s:hidden name="reqDetailNm" 	/>
											    
		<input type="hidden" name="ip" id="ip" value="<%=request.getRemoteAddr() %>" />
	 	<div id="popup_350se_top"></div>
	<div id="popup_350se_bg">
		<div id="popup_325se">
			<div id="popup_325se_box" >
		 		<ul>
					<li class="txt">기준일자</li>
					<li ><s:property value="reqYmd" /></li>
				</ul>
				<ul>
					<li class="txt">요청일자</li>
					<li ><s:property value="reqYyyymmdd" /></li>
				</ul>
				<ul>
					<li class="txt">변경전근태</li>
					<li><s:property value="reqDetailNm" /></li>
				</ul>
				<ul>
					<li class="txt">변경근태</li>
					<li>
					  <s:select list="listReqAttend" name="changeAttendDo" id="changeAttendDo" headerKey="ALL" headerValue="::전체::" cssClass="combobox120se" listKey="cd" listValue="cd_nm"/>
					</li>
				</ul>
				<ul>
					<li class="txt">변경사유</li>
					<li><s:textfield cssClass="input_200se" maxlength="10" name="req_etc" id="req_etc" cssClass="input_200se"/></li>
				</ul>
				<ul>
				    <li class="txt">확인자</li>
				    <li>
				       <s:select list="listAuth" name="authConfirm" id="authConfirm"  cssClass="combobox120se" listKey="emp_no" listValue="emp_nm"/>
				    </li>
				</ul>
			    <div id="popup_btn"><input type="image" value="저장" src="/images/btn_save.gif" style="cursor: pointer;" /></div>
			</div>
		</div>
	</div>
	<!---------------Bottom : STR----------->
	<div id="popup_350se_bottom"><s:submit type="image" src="/images/pop_btn_close.gif" onclick="window.close(); return false;"/></div>
	<!---------------Bottom : END----------->
	</s:form>
</body>
</html>